<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>悬停卡片</title>
    <link rel="stylesheet" href="./12-悬停卡片.css">
</head>
<style>
	body {
	    height: 100vh;
	    display: flex;
	    justify-content: center;
	    align-items: center;
	    background-color: #e8e8e8;
	}
	
	.card {
	    position: relative;
	    width: 220px;
	    height: 320px;
	    background: mediumturquoise;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    font-size: 25px;
	    font-weight: bold;
	    border-radius: 15px;
	    cursor: pointer;
	}
	
	.card::before,
	.card::after {
	    position: absolute;
	    content: "";
	    width: 20%;
	    height: 20%;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    font-size: 25px;
	    font-weight: bold;
	    background-color: lightblue;
	    transition: all 0.5s;
	}
	
	.card::before {
	    top: 0;
	    right: 0;
	    border-radius: 0 15px 0 100%;
	}
	
	.card::after {
	    bottom: 0;
	    left: 0;
	    border-radius: 0 100% 0 15px;
	}
	
	.card:hover::before,
	.card:hover:after {
	    width: 100%;
	    height: 100%;
	    border-radius: 15px;
	    transition: all 0.5s;
	}
	
	.card:hover:after {
	    content: "HELLO";
	}
</style>
<body>
    <div class="card">HOVER</div>
</body>
</html>